<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<style type="text/css">
		#boardLayout{
			border-style: solid;
			border-color: white;
		}
	</style>
	
</head>
<body>
	<h2 align="center">상세보기</h2>
	<hr>
	<form action="boardUpdate.do" method="post">
		<input type="hidden" name="b_no" value="${ detailItem.b_no }" />
		<table border="1" width="800px" align="center">
			<tr>
				<td width="200px"><b>게시물 번호</b></td>
				<td><b>작성자</b></td>
				<td><b>작성일</b></td>
				<td><b>조회수</b></td>
			</tr>
			<tr>
				<td bgcolor="eeeeee">${ detailItem.b_no }</td>
				<td bgcolor="eeeeee">${ detailItem.b_writer }</td>
				<td bgcolor="eeeeee">${ detailItem.b_regdate }</td>
				<td bgcolor="eeeeee">${ detailItem.b_hit }</td>
			</tr>
			<tr>
			</tr>
			<tr>
				<td><b>게시물 제목</b></td>
				<td colspan="4">
					<input type="text" name="b_title" value="${ detailItem.b_title }" size="100%" id="boardLayout"/>
				</td>
			</tr>
			<tr>
				<td colspan="4"><b>내용</b></td>
			</tr>
			<tr>
				<td colspan="4" id="boardLayout">
					<textarea rows="5" cols="100%" name="b_content">${ detailItem.b_content }</textarea>
				</td>
			</tr>
			<tr>
				<td colspan="4" id="boardLayout" align="right">
					<p>
						<c:if test="${ (empty sessionScope.sessionLoginID) || (sessionScope.sessionLoginID != detailItem.b_writer) }">
							<input type="submit" value="수정" disabled="disabled"> &nbsp;
							<input type="button" value="삭제" disabled="disabled"
								onclick="location.href='deleteBoard.do?no=${ detailItem.b_no }';"> &nbsp;
							<input type="button" value=" 목록보기" onclick="location.href='listBoard.do';">
						</c:if>
						<c:if test="${ (! empty sessionScope.sessionLoginID) && (sessionScope.sessionLoginID == detailItem.b_writer) }">
							<input type="submit" value="수정"> &nbsp;
							<input type="button" value="삭제"
								onclick="location.href='deleteBoard.do?no=${ detailItem.b_no }';"> &nbsp;
							<input type="button" value=" 목록보기" onclick="location.href='listBoard.do';">
						</c:if>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>